#include <iostream>
using namespace std;
bool fun(int x){
    for(int j = 2;j * j <= x;j++)
    {
        if(x%j == 0){
            return true;
        }
    }
    return false;
}
int main()
{
    int x;    cin>>x; 
    for(int i = x;i <= 2*x;i++){
        if(fun(i)){
            cout << i << endl;
            return 0;
        }    
    }
    cout << -1 << endl;
    return 0;
}
#include <iostream>
using namespace std;

int main(){
    int len;    cin>>len;
    int a = len/2;
    int b = len/3;
    if(len %3 == 2) b++;
    cout << b <<" " << a << endl;
    return 0;
}
#include <iostream>
using namespace std;
int N = 1e9+7;
// 1   0
// 2   1
// 3   7
// 4   19
int main(){
    int n = 0;    cin>>n;
    if(n == 1){
        cout << 0 << endl;
        return 0;
    }
    int ans = 1,mode = 2;
    while(mode < n){
        ans = (ans*2 + 5)%N;
        mode++;
    }
    cout << ans << endl;
    return 0;
}
#include <iostream>
#include <string>
#include <algorithm>
using namespace std;

string fun(string& str){
    string ans;
    int tmp = 0;
    for(int i = str.size() - 1;i >=0;i--){
        int a = tmp + (str[i] -'0')*2;
        if(a > 9) {
            a-=10,tmp = 1;
        }
        ans.push_back('0' + a);
    }
    if(tmp == 1){
        ans.push_back('1');
    }
    reverse(ans.begin(),ans.end());
    return ans;
}
bool check(string& str){
    int x = 0;
    for(char c : str){
        x += c-'0';
    }
    if(x == 1) return false;
    if(x == 2) return true;
    for(int i = 2;i *i <= x ;i++){
        if(x%i == 0){
            return false;
        }
    }
    return true;
}
void add(string& str){
    for(int i = str.size()- 1; i >= 0;i--)
    {
        if(str[i] != '9'){
            str[i]++;
            return;
        }else{
            str[i] = '0';
        }
    }
    str.insert(str.begin(),'1');
}
int main(){
    int t;    cin>>t;
    bool b = false;
    string str;
    while(t--)
    {
        b = false;
        cin>>str;
        string end = fun(str);
        add(end);
        // cout << "end = " << end << endl;
        while(str != end){
            if(check(str)){
                b = true;
                cout << str << endl;
                break;
            }else{
                add(str);
                // cout << str <<' ';
            }
        }
        if(!b)
            cout << "-1" << endl;
    }
    return 0;
}
#include <iostream>
using namespace std;
int N = 1e9 + 7;
int A(int a) {
	int ans = 1;
	if (a <= 0) return  1;
	while (a) {
		ans *= (a--);
	}
	return ans;
}
int C(int a, int b) {
	return A(a) / A(a - b) / A(b);
}
int main() {
	int n;    cin >> n;
	int i = n / 3, j = n / 2;
	if (i * 2 < j) {
		cout << 0 << endl;
		return 0;
	}
	int k = i * 2 - j;
	int ans = 1;
	int tmp1 = i, tmp2 = n - i, tmp3 = n - k;
	// cout << i << ' ' << j << ' ' << k << endl;
	int tmp = 0;
	tmp = (A(i) / A(k) / A(i - k)) %N;	// 3 的倍数一共有这几种排序方法
	// cout << tmp << endl;
	ans = (ans * tmp) % N;
	tmp = (C(i, k))%N;
	// cout << tmp << endl;
	ans = (ans * tmp) % N;
	tmp = (C(n - i, i - k))%N;
	// cout << tmp << endl;
	ans = (ans * tmp) % N;
	tmp = (A(n - i))%N;
	// cout << tmp << endl;
	ans = (ans * tmp) % N;

	cout << ans << endl;
	return 0;
}